<!--我要反馈-->
<template>
  <div class="sendfeedback">
    <div v-if="!isShowCheckbox">
      <van-row>
        <van-col span="24" style="background-color: #fff;">
          <div class="brief-introduction">
            <p class="emphasize">尊敬老师、同学：</p>
            <p>您在智慧门户使用过程中遇到的问题或者好的建议，请 在这里告诉我们。我们的工作人员会及时处理，多谢您 的宝贵意</p>
          </div>
        </van-col>
      </van-row>
      <van-row>
        <van-col span="24">
          <van-cell-group style="margin-top:10px">
            <van-field
              label="反馈对象"
              required
              readonly
              clickable
              :value="msg"
              right-icon="arrow"
              placeholder="请选择反馈对象"
              @click.stop="showCheck"
            />
            <van-field
              v-model="username"
              required
              clearable="true"
              label="主题"
              maxlength="40"
              placeholder="不超过40个字符"
              @click-right-icon="$toast('question')"
            />
          </van-cell-group>
          <van-cell-group style="margin-top:10px">
            <van-field
              v-model="ly"
              label="反馈内容"
              type="textarea"
              placeholder="请填写您的反馈意见"
              rows="4"
              autosize
              required
              clearable="true"
            />
          </van-cell-group>
          <van-cell-group style="margin-top:10px ; padding: 10px;">
            <uploadercomponent></uploadercomponent>
          </van-cell-group>
          <div style="margin-top:10px;padding:5px">
            <van-button @click="subimt" color="#704485" size="large">保存</van-button>
          </div>
        </van-col>
      </van-row>
    </div>
    <checkcomponent @back="listenBack" @check="listenCheck" v-else></checkcomponent>
  </div>
</template>
<script>
import uploadercomponent from "../../../components/Uploadercomponent.vue";
import checkcomponent from "../../../components/Checkcomponent.vue";
export default {
  components: { uploadercomponent, checkcomponent },
  data() {
    return {
      isShowCheckbox: false
    };
  },
  methods: {
    subimt() {},
    showCheck() {
      this.isShowCheckbox = true;
    },
    listenBack(val) {
      this.isShowCheckbox = val;
    },

    // 部门人员选择监听
    listenCheck(data) {
      console.log(data);
      this.msg = data.msg;
      this.listenBack(false);
    }
  }
};
</script>
<style lang="less" >
.sendfeedback {
  height: 100%;
  overflow-y: auto;
  background-color: #e5e5e7;
  .brief-introduction {
    margin: 15px;
    font-size: 14px;
    .emphasize {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    p {
      font-size: 14px;
    }
  }
  .van-button__text {
    color: #fff;
  }
}
</style>